package com.yuxi.Dao.Impl;

import java.io.Serializable;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.yuxi.Dao.CommentRecordBrowseDao;
import com.yuxi.Entity.CommentRecordBrowse;
import com.yuxi.Request.Page;

@Repository
public class CommentRecordBrowseDaoImpl extends BaseDaoImpl<Serializable,Serializable> implements CommentRecordBrowseDao {

	private Logger logger=LoggerFactory.getLogger(CommentRecordBrowseDaoImpl.class);
	public CommentRecordBrowseDaoImpl(){
		super(CommentRecordBrowse.class);
	}
	
	@Override
	public CommentRecordBrowse getBrowse(Integer rBrowseId) {
		// TODO Auto-generated method stub
		return (CommentRecordBrowse) super.get(rBrowseId);
	}

	@Override
	public CommentRecordBrowse addBrowse(CommentRecordBrowse rBrowse) {
		// TODO Auto-generated method stub
		return (CommentRecordBrowse) super.addAndReturn(rBrowse);
	}

	@Override
	public void deleteBrowse(CommentRecordBrowse rBrowse) {
		// TODO Auto-generated method stub
		super.delete(rBrowse);
	}

	@Override
	public void modifly(CommentRecordBrowse rBrowse) {
		// TODO Auto-generated method stub
		super.update(rBrowse);
	}

	@Override
	public Page<CommentRecordBrowse> getCommentRecordBrowseAll(Page p) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<CommentRecordBrowse> getCommentRecordBrowseByInfoId(int infoId) {
		return super.find("from CommentRecordBrowse where informationId = ?  order by browseTime desc", infoId);
	}

}
